Вы используете локальные переменные в LINQ и используете let? 👇
Ключевое слово let позволяет вводить временную переменную прямо внутри запроса LINQ — как локальную переменную в цикле.
Разбивайте сложные вычисления на части
Делайте запрос модульнее и чище
Меньше проходов по данным → выше производительность
👉 Простой пример: csharp
from order in orders let total = order.Items.Sum(i => i.Price * i.Quantity) where total > 1000 let categories = order.Items.Select(i => i.Category).Distinct() select new { OrderId = order.Id, Total = total, Categories = categories };
let total = … — вычисляем сумму заказа только один раз
where total > 1000 — фильтруем по готовому значению
let categories = … — собираем уникальные категории
Вы используете локальные переменные в LINQ и используете let? 👇
Ключевое слово let позволяет вводить временную переменную прямо внутри запроса LINQ — как локальную переменную в цикле.
Разбивайте сложные вычисления на части
Делайте запрос модульнее и чище
Меньше проходов по данным → выше производительность
👉 Простой пример: csharp
from order in orders let total = order.Items.Sum(i => i.Price * i.Quantity) where total > 1000 let categories = order.Items.Select(i => i.Category).Distinct() select new { OrderId = order.Id, Total = total, Categories = categories };
let total = … — вычисляем сумму заказа только один раз
where total > 1000 — фильтруем по готовому значению
let categories = … — собираем уникальные категории
China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.
What is Telegram?
Telegram’s stand out feature is its encryption scheme that keeps messages and media secure in transit. The scheme is known as MTProto and is based on 256-bit AES encryption, RSA encryption, and Diffie-Hellman key exchange. The result of this complicated and technical-sounding jargon? A messaging service that claims to keep your data safe.Why do we say claims? When dealing with security, you always want to leave room for scrutiny, and a few cryptography experts have criticized the system. Overall, any level of encryption is better than none, but a level of discretion should always be observed with any online connected system, even Telegram.